package com.sc.demo.dao;

import java.util.Map;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.sc.demo.annotation.TableRouter;
import com.sc.demo.router.Router;
import com.sc.model.User;



/**
 * @author huan
 */
@Mapper
@TableRouter(arithmetic = Router.RouterArithmetic.hash, table = "user", column = "id", pattern = "user_{0}", count = 10)
public interface UserDao  {


    @Select("select * from user where id = #{id}")
    User selectUserById(String id);

    @Insert("insert into user(id,username,password ) values (#{id},#{username},#{password} ) ")
	void insert(Map<String , Object> entity);

    
}
